﻿namespace PageTransition.View
{
    using System;
    using WP7Contrib.View.Transitions.Animation;

    public partial class SlideRight : AnimatedBasePage
    {
        public SlideRight()
        {
            InitializeComponent();
            AnimationContext = this.LayoutRoot;
        }

        protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom)
        {
            if (animationType == AnimationType.NavigateForwardIn)
            {
                return new SlideRightFadeInAnimator { RootElement = this.LayoutRoot };
            }

            return new SlideLeftFadeOutAnimator { RootElement = this.LayoutRoot };
        }
    }
}